package edu.neusoft.yiqibike.service;

import edu.neusoft.yiqibike.common.entity.mysql.Admin;
import edu.neusoft.yiqibike.common.entity.mysql.Permission;
import edu.neusoft.yiqibike.common.entity.mysql.Role;
import edu.neusoft.yiqibike.common.entity.vo.TreeVo;

import java.util.Collection;
import java.util.List;
import java.util.Map;

/**
 * User：lyc
 * Date：2017-12-30
 * Time：14:12
 * Description：
 */
public interface IAuthorizationService {
    TreeVo getTreeList(Long aid);

    Long addRole(Long aid, TreeVo roleVo, Admin admin);

    Long addPermission(Long rid, TreeVo permissionVo, Admin admin);

    Map<String, List> getRoles(Long aid);

    void updateRole(Long aid, List<Long> rids, Admin admin);

    Map<String, List> getPermissions(Long aid);

    void updatePermission(Long rid, List<Long> pids, Admin admin) throws Exception;

    List<Role> getRolesByAid(Long id);

    List<Permission> getPermissionsByRids(Collection<Long> rids);
}
